package com.home.qh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.qh.dao.CodeTypeDao;
import com.home.qh.model.CodeType;
import com.home.qh.service.CodeTypeManager;

/**
 * Implementation of RoleManager interface.
 *
 * @author <a href="mailto:dan@getrolling.com">Dan Kibler</a>
 */
@Service("codeTypeManager")
public class CodeTypeManagerImpl extends GenericManagerImpl<CodeType, Long> implements CodeTypeManager {
	CodeTypeDao codeTypeDao;

    @Autowired
    public CodeTypeManagerImpl(CodeTypeDao codeTypeDao) {
        super(codeTypeDao);
        this.codeTypeDao = codeTypeDao;
    }

	public List<CodeType> getCodeTypeByCodeAndName(String codeTypeCode,
			String codeTypeName) {
		return codeTypeDao.getCodeTypeByCodeAndName(codeTypeCode, codeTypeName);
	}

	public List<CodeType> getCodeTypeByCodeType(CodeType codeType, String sort, boolean desc, int startResult, int maxResults) {
		return codeTypeDao.getCodeTypeByCodeType(codeType, sort, desc, startResult, maxResults);
	}

}